/**
 * 
 */
package edu.cmu.cs.webapp.ioms.perspectives;

import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;

import edu.cmu.cs.webapp.ioms.views.UsersListView;
import edu.cmu.cs.webapp.ioms.views.UsersPanelView;

/**
 * @author Christian
 * 
 */
public class UserAdminPerspective implements IPerspectiveFactory {

	public static final String PERSPECTIVE_ID = "edu.cmu.cs.webapp.ioms.perspectives.user";

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui
	 * .IPageLayout)
	 */
	@Override
	public void createInitialLayout(IPageLayout layout) {
		layout.setEditorAreaVisible(false);

		// create top folder(placeholder)

		layout.addFastView(UsersPanelView.ID_VIEW);

		// create right folder
		IFolderLayout rightFolder = layout.createFolder("topFilder",
				IPageLayout.TOP | IPageLayout.TOP,
				new Float(0.60).floatValue(), IPageLayout.ID_EDITOR_AREA);

		rightFolder.addView(UsersListView.ID_VIEW);
		// topFolder.addView(UsersPanelView.ID_VIEW);

		layout.getViewLayout(UsersPanelView.ID_VIEW).setCloseable(false);
		layout.getViewLayout(UsersPanelView.ID_VIEW).setMoveable(false);
		layout.getViewLayout(UsersListView.ID_VIEW).setCloseable(false);
		layout.getViewLayout(UsersListView.ID_VIEW).setMoveable(false);

	}

}
